<form id="edit-unit-form" method="post"
      action="detail-edit-function.php"
      enctype="multipart/form-data" class="layui-form">


    <input type="hidden" name="nid" value="<?echo $detail['nid']?>"/>

<div class="layui-form-item">
    <label class="layui-form-label">跟进负责人</label>
    <div class="layui-input-block">
        <select name="ai_agentnid" lay-search="" >
            <option value="<? echo $detail['agentnid']?>"><? echo $now_employee['name']?></option>
            <option value="">无</option>
            <? for($i=0;$i<count($employee_list);$i++){ ?>
                <option value="<? echo $employee_list[$i]['nid'] ?>"><? echo $employee_list[$i]['nid'] ?> : <? echo $employee_list[$i]['name'] ?></option>
            <? } ?>
        </select>
    </div>
</div>





    <div class="layui-form-item">
        <label class="layui-form-label">来源</label>

        <div class="layui-input-block" >
            <? foreach ($source_array as $k => $v){?>
                <input type="radio" name="ai_customer_source[]"  value="<?echo $v?>"     title="<?echo $v?>"
                    <? if(in_array($v,$now_unit_source_array))   {echo "checked";} ?>>
                <?;}?>

        </div>
    </div>





    <div class="layui-form-item">
    <label class="layui-form-label">评级</label>
    <div class="layui-input-block" >
        <? foreach ($rank_array as $k => $v){?>
                <input type="radio" name="ai_rank[]"  value="<?echo $v?>"
                       title="<?echo $v?>"
                       <? if(in_array($v,$now_unit_rank_array)){echo "checked";} ?>
                >
        <?;}?>
    </div>
</div>


    <div class="layui-form-item">
        <label class="layui-form-label">标签</label>
        <div class="layui-input-block" >
            <? foreach ($tag_array as $k => $v){?>
                <input type="checkbox" name="ai_tag[]"  value="<?echo $v?>"     title="<?echo $v?>"
                    <? if(in_array($v,$now_unit_tag_array))   {echo "checked";} ?>

                >
                <?;}?>
        </div>

    </div>



<div class="layui-form-item">
    <label class="layui-form-label">跟踪节点</label>
    <div class="layui-input-block">
        <input type="text" name="ai_checkpoint" id="date" autocomplete="off" class="layui-input"  value="<? echo $detail['checkpoint']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">

        <div class="notice">设置下次跟踪日期。跟踪周期会根据此日期进行设置</div>

    </div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">跟踪周期</label>

    <div class="layui-input-block" >
        <input type="radio" name="ai_period"  value="无限制"    title="无限制"  <? if($detail['period']=="无限制")      {echo "checked";} ?>>
        <input type="radio" name="ai_period"  value="每日"    title="每日"  <? if($detail['period']=="每日")      {echo "checked";} ?>>
        <input type="radio" name="ai_period"  value="每周"    title="每周"  <? if($detail['period']=="每周")      {echo "checked";} ?>>
        <input type="radio" name="ai_period"  value="每月"    title="每月"  <? if($detail['period']=="每月"){echo "checked";} ?>>
        <input type="radio" name="ai_period"  value="每年"    title="每年"  <? if($detail['period']=="每年"){echo "checked";} ?>>
        <div class="notice">根据设置的checkpoint 来到判断循环周期。每日的话就自动更新加一，每周则加7日，每月则下一个月的今天，每年则+1年</div>

    </div>

</div>




<div>
    <div class="layui-form-item">
        <label class="layui-form-label"> </label>

         <button class="layui-btn"> 提交</button>
    </div>
</div>




</form>